if [ -e "/root/alpha/ikitrobot_one/build/check/check_node" ]; then
    rm "/root/alpha/ikitrobot_one/build/check/check_node"
fi

if [ -e "/root/alpha/ikitrobot_one/devel/lib/check/check_node" ]; then
    rm "/root/alpha/ikitrobot_one/devel/lib/check/check_node"
fi

export ISYSROOT=/opt/ikitrobot/sysroot
export LD_LIBRARY_PATH=$ISYSROOT/lib:$LD_LIBRARY_PATH
export PATH=$ISYSROOT/bin:$PATH

if [ ! -d "/opt/ikitrobot/sysroot" ] ;  then
  sudo mkdir -p "/opt/ikitrobot/sysroot"
  echo "create /opt/ikitrobot/sysroot sucess!"
else
  echo "/opt/ikitrobot/sysroot exist!"
fi

source /opt/ros/melodic/setup.bash
pushd /root/alpha/ikitrobot_one/
catkin_make -j16 -DCATKIN_WHITELIST_PACKAGES="check" -DCATKIN_ENABLE_TESTING=OFF
popd